/*
 *    Copyright © OpenAtom Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.inspur.edp.bff.api.manager.context;


import com.inspur.edp.bef.api.parameter.retrieve.RetrieveParam;
import com.inspur.edp.cef.entity.entity.IEntityData;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * 检索上下文
 * 检索前，检索，检索后扩展动作共用一个检索上下文
 * 扩展动作执行顺序可参考：<a href=https://open.inspuronline.com/iGIX/#/document/mddoc/docs-gsp-cloud-ds%2Fdev-guide-beta%2Fadvanced-development%2Fvo-relatedcomponent-development%2F%E6%89%A9%E5%B1%95%E5%8A%A8%E4%BD%9C%2Fvo%E6%89%A9%E5%B1%95%E5%8A%A8%E4%BD%9C.md">点击这里</a>查看。
 */
public class RetrieveContext {
    /**
     * 要检索的数据ID
     */
    private ArrayList<String> dataIds = new ArrayList<String>();
    private RetrieveParam param;
    private HashMap<String, ArrayList<IEntityData>> retrieveData = new HashMap<String, ArrayList<IEntityData>>();
    private ArrayList<IEntityData> retrieveResult = new ArrayList<IEntityData>();

    public final ArrayList<String> getDataIds() {
        return dataIds;
    }

    public final void setDataIds(ArrayList<String> value) {
        dataIds = value;
    }

    /**
     * 检索的参数
     *
     * @return
     * @see RetrieveParam
     */
    public final RetrieveParam getParam() {
        return param;
    }

    public final void setParam(RetrieveParam value) {
        param = value;
    }

    /**
     * 数据源检索结果集
     * Key：数据源编号，内部默认Key值使用Default，开发时请注意不要使用该Key值,以免出现未知问题。
     * Value：数据源检索集
     */
    public final HashMap<String, ArrayList<IEntityData>> getRetrieveData() {
        return retrieveData;
    }

    public final void setRetrieveData(HashMap<String, ArrayList<IEntityData>> value) {
        retrieveData = value;
    }

    /**
     * Vo检索结果，该结果是经过数据Mapping转换之后的vo数据结构
     */
    public final ArrayList<IEntityData> getRetrieveResult() {
        return retrieveResult;
    }

    /**
     * Vo检索结果
     */
    public final void setRetrieveResult(ArrayList<IEntityData> value) {
        retrieveResult = value;
    }

}
